import React, { memo } from "react";

import { dicoverMenu } from "@/common/local-data";
import request from "@/services/request";
import { NavLink } from "react-router-dom";
// import {useRoutes} from "react-router";
// import routes from "@/router"
import {Outlet} from "react-router";
import {
  DiscoverWrapper,
  TopMenu
} from './style';
export default memo(function XJDDiscover() {
// useEffect(()=>{
//   request({
//     url:"/banner",
//   }).then(res=>{
//     console.log(res)
//   })
// },[])


  // const {route} =props
  // console.log(route);
  // const element=useRoutes(routes)
  // console.log(element);
  return (

     <DiscoverWrapper>
    <div className="top">
      <TopMenu className="wrap-v1">
        {
          dicoverMenu.map((item, index) => {
            return (
              <div className="item" key={item.title}>
                <NavLink to={item.link}>{item.title}</NavLink>
              </div>
            )
          })
        }
      </TopMenu>
    </div>
    <Outlet></Outlet>
  </DiscoverWrapper>
 
  );
});
